<?php
/**
 * 웹 Core 처리부
 *
 * 실제 index.php가 로드됐을 경우 실행되는 플로우를 담고 있는 페이지
 * 테스트 케이스 작성을 위해 해당 부분을 따로 분리하였음.
 *
 * @author Platform Team
 */

$Router = Router::getInstance();

include FW_DIR_FRAMEWORK_CONF . '/conf.sslwrap.php';
include FW_DIR_FRAMEWORK_CONF . '/conf.router.php';

$Router->initialize(FW_ROUTE_MAP_TYPE, FW_XSS_FILTER_USE, Configure::get('FW.fix_cgi_pathinfo'), Sslwrap::instance());
unset($Router);

if (FW_GPCR_LOG_USE === true) {
    GPCRlog::create();
}

if (FW_P3P_HEADER_ENABLED === true) {
    header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"');
}

Hooker::run('before_dispatcher_init');

$Dispatcher = Dispatcher::getInstance();

autoInitializeExecute();

Hooker::run('after_dispatcher_init');

$Dispatcher->exec();

Hooker::run('before_dispatcher_display');

autoDestructExecute();

$Dispatcher->display();
unset($Dispatcher);

Hooker::run('after_dispatcher_display');